<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAttachsTable extends Migration
{
    public function up()
    {
        Schema::create('attaches', function (Blueprint $table) {
            $table->increments('id');
            $table->string('app_id');
            $table->string('app_name')->nullable();
			$table->Integer('user_id')->default(0);
			$table->string('file')->nullable();
			$table->Integer('downloads')->default(0);
			$table->Integer('buys')->default(0);
            $table->string('note')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('attaches');
    }
}
